package com.tjise.g_fats_enemy.springboot.controller;

import com.tjise.g_fats_enemy.springboot.dao.TopTypeDao;
import com.tjise.g_fats_enemy.springboot.po.TopType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class TopTypeController {
    @Autowired
    TopTypeDao topTypeDao;

    @RequestMapping(value = "getTopType", method = {RequestMethod.GET, RequestMethod.POST})
    @ResponseBody
    public List<TopType> getTopType(){
        return topTypeDao.findTopType();
    }
}
